import request from '@/utils/request'

// 查询任务卡拆解任务列表
export function listSplitTask(query) {
  return request({
    url: '/pla/splitTask/list',
    method: 'get',
    params: query
  })
}

// 查询二级任务列表
export function listSecondTask(taskId) {
  return request({
    url: 'pla/splitTask/secondList/' + taskId,
    method: 'get'
  })
}


// 查询任务卡拆解任务详细
export function getSplitTask(taskSplitId) {
  return request({
    url: '/pla/splitTask/' + taskSplitId,
    method: 'get'
  })
}

// 新增任务卡拆解任务
export function addSplitTask(data) {
  return request({
    url: '/pla/splitTask',
    method: 'post',
    data: data
  })
}

// 修改任务卡拆解任务
export function updateSplitTask(data) {
  return request({
    url: '/pla/splitTask',
    method: 'put',
    data: data
  })
}

// 删除任务卡拆解任务
export function delSplitTask(taskSplitId) {
  return request({
    url: '/pla/splitTask/' + taskSplitId,
    method: 'delete'
  })
}
